<div class="nhdActivityRecords form">
	<?php echo $this->render('_filter_add', '');?>
	
<?php echo $this->Form->create('NhdActivityRecord');?>
	<fieldset>
		<legend><?php __('Thống kê hoạt động RHM'); ?></legend>
	<?php
		//echo $this->Form->input('user_id');
		echo $this->Form->input('city_id', array('type'=>'hidden', 'value'=>$city["id"]));
		//echo $this->Form->input('nhd_activity_id');s
		//echo $this->Form->input('school_num');
		//echo $this->Form->input('school_rate');
		//echo $this->Form->input('student_num');
		//echo $this->Form->input('student_rate');
		//echo $this->Form->input('unit_id');
		echo $this->Form->input('year', array('label'=>'Năm', 'type'=>'hidden', 'value'=>$year));
		echo $this->Form->input('quarter', array('label'=>'Quý', 'type'=>'hidden', 'value'=>$quarter));
	?>
	
	<div class="input text required">
		<label for="NhdDeviceResourceValue">Bảng cập nhật</label>		
		<table cellpadding="0" cellpadding="0" id="input_tablez">
			<tr>
				<th colspan="3" rowspan="2"><?php __('Nội dung hoạt động'); ?></th>
				<th colspan="2"><?php __('Trường'); ?></th>
				<th colspan="2"><?php __('Học sinh'); ?></th>
			</tr>
			<tr>				
				<th><?php __('Số lượng'); ?></th>
				<th><?php __('Tỉ lệ(%) đáp ứng'); ?></th>
				<th><?php __('Số lượng'); ?></th>
				<th><?php __('Tỉ lệ(%) đáp ứng'); ?></th>
			</tr>
			<?php foreach($nhdActivities as $b => $item) { ?>
				<tr>
					<td><?php $i = $b == 0 ? 0 : $b-1; echo $b == 0 ? "ND".$item["NhdActivityCategory"]["nd"] : ''; echo $item["NhdActivityCategory"]["nd"] != $nhdActivities[$i]["NhdActivityCategory"]["nd"] ? "ND".$item["NhdActivityCategory"]["nd"] : ''; ?></td>
					<td><?php $i = $b == 0 ? 0 : $b-1; echo $b == 0 ? $item["NhdActivityCategory"]["name"] : ''; echo $item["NhdActivityCategory"]["name"] != $nhdActivities[$i]["NhdActivityCategory"]["name"] ? $item["NhdActivityCategory"]["name"] : ''; ?></td>
					<td><?php echo $item["NhdActivity"]["name"] ?></td>					
					<td>
						
							<input class="iit" type="text" id="NhdActivityRecordSchoolNum_<?php echo $item["NhdActivity"]["id"] ?>" value="<?php echo $item["NhdActivityRecord"]["school_num"] ?>" maxlength="255" name="data[NhdActivityRecord][records][<?php echo $item["NhdActivity"]["id"] ?>][school_num]" />
					</td>
					<td>
							<input class="" type="text" id="NhdActivityRecordSchoolRate_<?php echo $item["NhdActivity"]["id"] ?>" value="<?php echo $item["NhdActivityRecord"]["school_rate"] ?>" maxlength="255" name="data[NhdActivityRecord][records][<?php echo $item["NhdActivity"]["id"] ?>][school_rate]" />
					</td>
					<td>
							<input class="iit" type="text" id="NhdActivityRecordStudentNum_<?php echo $item["NhdActivity"]["id"] ?>" value="<?php echo $item["NhdActivityRecord"]["student_num"] ?>" maxlength="255" name="data[NhdActivityRecord][records][<?php echo $item["NhdActivity"]["id"] ?>][student_num]" />
					</td>
					<td>
							<input class="" type="text" id="NhdActivityRecordStudentRate_<?php echo $item["NhdActivity"]["id"] ?>" value="<?php echo $item["NhdActivityRecord"]["student_rate"] ?>" maxlength="255" name="data[NhdActivityRecord][records][<?php echo $item["NhdActivity"]["id"] ?>][student_rate]" />
					</td>
					
				</tr>
			<?php } ?>
		</table>
	</div>
	
	</fieldset>
<?php echo $this->Form->end(__('Lưu thông tin', true));?>
</div>
<div class="actions">
	<h3><?php __('Chức năng'); ?></h3>
	<ul>		
	</ul>
</div>